cmake_minimum_required(VERSION 3.16)

project(openssl_test LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(SSL_DIR "C:/Program Files/OpenSSL-Win64")
set(SSL_INCLUDE_DIR "${SSL_DIR}/include")
set(SSL_LIBRARY_DIR "${SSL_DIR}/lib")

include_directories(${CMAKE_CURRENT_LIST_DIR})
include_directories(${SSL_INCLUDE_DIR})
link_directories(${SSL_LIBRARY_DIR})
add_executable(openssl_test main.cpp)
target_link_libraries(openssl_test libcrypto libssl openssl)


include(GNUInstallDirs)
install(TARGETS openssl_test
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
